#include <iostream>
using namespace std;

class Book {
private:
    string name;
    double price;
    int count = 0;
    double AllPrice = 0;

public:
    Book(string name, double price) {
        this->name = name;
        this->price = price;
        count++;
        AllPrice = AllPrice + price;
    }

    //显示该类图书对象共有几个
    int showCount() {
        return count;
    }

    //显示改类图书对象的总价格
    double showAllprice() {
        return AllPrice;
    }

    //显示该类图书的单价
    double showPrice() {
        return price;
    }

    //修改图书属性
    void updateAll(string name, double price) {
        this->name = name;
        this->price = price;
    }
};
